package com.jiuyou.storeController.config;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * majie
 */
@RestController
@RequestMapping("/store/config")
public class ConfigStoreController extends BaseController {
    @Autowired
    private ISysConfigService configService;

    /**
     * 根据key获取参数设置中配置的值
     * @param key
     * @return
     */
    @PostMapping("/getConfigByKey/{key}")
    public String getConfigByKey(@PathVariable String key, HttpServletRequest request){

       return configService.selectConfigByKey(key);
    }
}
